home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 14
/
Mac Magazin and MacEasy Magazine CD - Issue 14.iso
/
Wissenschaft & Technik
/
StandardGetFolder 2.0
/
Documentation
/
StandardGetFolder ReadMe
next >
Wrap
Text File
|
1995-07-15
|
7KB
|
133 lines
Standard Get Folder ReadMe
Text and Source Copyright © 1993–1995 Chris Larson (larson@kingston.cs.ucla.edu), all rights reserved
Standard Get Folder is a procedure which, go figure, allows a user to select a folder via the
Standard File Package. Details about using the StandardGetFolder procedure can be found
in the user’s guide; this document is simply a catch-all for everything I wanted to say but
didn’t belong in the User’s Guide.
Why Did I Do It?
In the course of working on a project, I happened to download some existing code samples for
folder selection via the standard file package. After examining the code in each and discovering
errors and/or omissions in all of them (well, all the ones I looked at anyway; I’m not sure if I
looked at every folder selection package available), I decided it was time to write my own. This
package is the result of my efforts.
Standard Get Folder Features
I tried to make StandardGetFolder do as much as I thought necessary to do the job right,
handling some of the problems that were not implemented right (or at all) in the other
packages I have examined.
n Internal Error Handling — Some other packages did no error checking or handling at all;
my routine handles any expected errors internally (just like the Standard File Package) and
only returns to the application when the user selects a folder or cancels the selection. (This
is not strictly true; the routine can return on an out-of-memory or resource not found error
but these conditions will be reported to the calling application.)
n Correct Handling of Activate and Update Events — Some of the routines I looked at didn’t
even update the Standard File Package dialogs correctly. These routines handle window
events correctly and even provide a hook to allow application windows to be updated while
modal dialogs are obscuring them (refer to the Technical Note TB 37 - Pending Update Perils
for details on this problem).
n Complete Support for Balloon Help — Completely missing from most everything I looked at,
balloon help is provided for every element in the Standard Get Folder dialogs.
n Easy Localization (I hope) — Other packages had string literals within the code and other
localization problems. I have stored all string literals as resources and employed the
International Utilities and Script Manager where appropriate (as opposed to using strcmp
for example). I have not had an opportunity to localize this package to any language other
than U.S. English (call me uncultured; I don’t speak any other language), so this remains
untested.
n Low Network Traffic — The method described in Inside Macintosh: Files for updating the
title of the select button causes a volume catalog query every time through the event loop,
resulting in a measurable amount of network traffic when selecting a folder on a remote
volume. My routine only re-examines the volume catalog when necessary, resulting in
a dramatic reduction in network traffic.
n Does Not Require the ANSI Libraries — All work is done by calling the Toolbox, thus
removing the need to link with the ANSI libraries. This resulted mostly from the attempt
to make localization possible (e.g. by not using strcmp) and also out of a concern for space.
Standard Get Folder Problems
Cosmetic Bug with OpenWide and DialogView
OpenWide and DialogView modify Standard File Package dialog boxes to provide a larger area
for displaying the file list. Both of these fail to place the buttons in the Standard Get Folder dialog
in aesthetically pleasing locations. All functionality remains intact, this is simply a cosmetic bug.
Cosmetic Bug with Greg’s Buttons
Gerg’s Buttons is a control panel which allows the user to, among other things, replace the
standard controls with 3-d controls. Greg’s Buttons (and any other INIT which replaces the
system controls) fails to replace the New Folder button corrrectly. This is owing to the fact that
I use a custom CDEF for handling this button. The New Folder button still functions properly,
it just jooks a little weird.
Other Information About Standard Get Folder
Requirements
Standard Get Folder needs at least System 7.0 to function correctly. It will make use of the added
features of System Update 3.0 and/or System 7.5 if either is installed.
Testing
This package has been tested on a Macintosh Plus, Powerbook 160, and Power Macintosh 7100/80
with system versions 7.0, 7.1 (with System Update 3.0), and 7.5 respectively.
Usage Rules
This package (source code and compiled derivatives) may be used in any shareware product (or
other such stuff: freeware, postcardware, etc.) as long as you mention me in your credits (of
course, a registered version of whatever you write using this package wouldn’t hurt either ;-).
This package is not in the public domain and may not be used in any public domain product in
any fashion. This package may not be used in any commercial product without the expressed,
written consent of the author.
Legal Stuff
This package is Copyright © 1993–1995 Chris Larson, all rights reserved. I have made a great
effort to ensure that this package is free of bugs but I make no warranty, either implied or
explicit, as to the functionality of this package. By using this package, the user assumes all
responsibility for any damages caused by this package, either directly or indirectly.
Author
Chris Larson
5305 Parkmor Rd. #3
Calabasas, CA 91302
Internet E-Mail (preferred) larson@kingston.cs.ucla.edu
Standard Get Folder Version History
Version 2.0 — July 3, 1995
Added the ability to specify a set of access privileges for desired folders, thus enabling the selection
of write-only (drop) folders.
Added the New Folder button and supporting routines (mucho work).
Changed the pascal string routines to use those in <PLStringFuncs.h> instead of using the 680x0
assembly routines used previously.
Changed the trap patch to C from 680x0 assembly so it can be compiled native for PPC.
Improved the internal error handling to rely much less on the Standard File Package dealing
with errors itself.
Vastly improved the documentation.
Version 1.0 — August 1993
Initial release.